module.exports = {
  injectChanges: false, // workaround for Angular 2 styleUrls loading
  files: ['./**/*.{html,htm,css,js}'],
  watchOptions: {
    ignored: 'node_modules'
  },
  host: "192.168.15.48",
  ui: {
    port: 3000,
    weinre: {
      port: 4000
    }
  },
  proxy: {
    target: "http://192.168.15.48:8080",
    middleware: [
      {
        route: "/api",
        handle: function (req, res, next) {
          // handle any requests at /api
        }
      }
    ],
    proxyReq: [
      function(proxyReq) {
        proxyReq.setHeader('X-Special-Proxy-Header', 'ls');
      }
    ],
    proxyRes: [
      function(proxyRes, req, res) {
        // console.log(proxyRes.headers);
      }
    ]
  },
  server: {
    baseDir: './dist',
    middleware: [
      require('connect-logger')({ format: '%date %status %method %url' }),
      require('connect-history-api-fallback')({
        index: '/index.html',
        htmlAcceptHeaders: ['text/html', 'application/xhtml+xml'] // systemjs workaround
      })
    ]
  },
  open: "local",
  browser: ["google chrome", "firefox"],
  reloadOnRestart: true,
  minify: false
};
